home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Turnbull China Bikeride
/
Turnbull China Bikeride - Disc 1.iso
/
ARGONET
/
PD
/
MATHS
/
RLAB
/
RLAB125.ZIP
/
!RLaB
/
help_ai
/
diag
< prev
next >
Wrap
Text File
|
1994-02-21
|
533b
|
21 lines
diag:
Syntax: diag ( A )
diag ( A , K )
Description:
If the 1st argument is a 1xN matrix construct a diagonal
matrix from the input . Optionally if K (scalar) is specified
then create a matrix with the vector as the Kth diagonal.
If the 1st argument is a MxN matrix, construct a 1xN matrix
from the diagonal elements of the input matrix. Optionally if
K is specified return the vector from the Kth diagonal of the
input matrix.
K < 0 is below the main diagonal.
K > 0 is above the main diagonal.
See Also: tril, triu